import { EntitySchema } from '@mikro-orm/core';

export class ImsYzdKpWxappScheme {
  id!: number;
  uniacid!: number;
  title!: string;
  path?: string;
  isExpire?: number;
  expireTime?: string;
  scheme?: string;
  link?: string;
  num: number = 0;
  time!: string;
}

export const ImsYzdKpWxappSchemeSchema = new EntitySchema({
  class: ImsYzdKpWxappScheme,
  properties: {
    id: { primary: true, type: 'number' },
    uniacid: { type: 'number' },
    title: { type: 'string', length: 255 },
    path: { type: 'string', length: 255, nullable: true },
    isExpire: { type: 'number', columnType: 'tinyint', nullable: true },
    expireTime: { type: 'string', length: 255, nullable: true },
    scheme: { type: 'string', length: 255, nullable: true },
    link: { type: 'string', length: 255, nullable: true },
    num: { type: 'number', default: 0 },
    time: { type: 'string', length: 255 },
  },
});
